package com.sample.cron.controller;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class TaskController {

//    @Scheduled(cron = "*/1 * * * * ?")
    @Scheduled(cron = "00 00 17 * * ?")
    public void print(){
        System.out.println("执行定时任务啦");
    }
}
